<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>wcenter</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center></center>
    <div align="right">Last update : 20/12/2004</div>
    <p>
      <b>wcenter</b> -   center and weight</p>
    <h3>
      <font color="blue">Calling Sequence</font>
    </h3>
    <dl>
      <dd>
        <tt>s=wcenter(x)  </tt>
      </dd>
      <dd>
        <tt>s=wcenter(x,'r') or s=wcenter(x,1)  </tt>
      </dd>
      <dd>
        <tt>s=wcenter(x,'c') or s=wcenter(x,2)  </tt>
      </dd>
    </dl>
    <h3>
      <font color="blue">Parameters</font>
    </h3>
    <ul>
      <li>
        <tt>
          <b></b>
        </tt>x: real or complex vector or matrix</li>
    </ul>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>
    This  function computes  <tt>
        <b>s</b>
      </tt>,  the weigthed and centred 
    version of the numerical matrix <tt>
        <b>x</b>
      </tt>.</p>
    <p>
    For  a vector  or a  matrix  <tt>
        <b>x</b>
      </tt>, <tt>
        <b>s=wcenter(x)</b>
      </tt>
    returns in  the <tt>
        <b>(i,j)</b>
      </tt> coefficient of  the matrix 
    <tt>
        <b>s</b>
      </tt>   the  value  <tt>
        <b>(x(i,j)-xbar)/sigma</b>
      </tt>,   where  
    <tt>
        <b>xbar</b>
      </tt> is the  mean of the values of  the coefficients of
    <tt>
        <b>x</b>
      </tt> and <tt>
        <b>sigma</b>
      </tt> his standard deviation.</p>
    <p>
      <tt>
        <b>s=wcenter(x,'r')</b>
      </tt>     (or,     equivalently,    
    <tt>
        <b>s=wcenter(x,1)</b>
      </tt>)  is the  rowwise centre  reduction of
    the  values  of <tt>
        <b>x</b>
      </tt>.   It  returns  in  the entry  <tt>
        <b>s(i,j)</b>
      </tt> 
    the value <tt>
        <b>(x(i,j)-xbarv(j))/sigmav(j)</b>
      </tt> with
    <tt>
        <b>xbarv(j)</b>
      </tt>  the mean  of the  values of  the  <tt>
        <b>j</b>
      </tt>
    column and  <tt>
        <b>sigmav(j)</b>
      </tt> the standard  deviation of the
    <tt>
        <b>j</b>
      </tt> column of <tt>
        <b>x</b>
      </tt>.</p>
    <p>
      <tt>
        <b>s=wcenter(x,'c')</b>
      </tt>     (or,     equivalently, 
    <tt>
        <b>s=wcenter(x,2)</b>
      </tt>) is the columnwise centre reduction of
    the  values  of <tt>
        <b>x</b>
      </tt>.   It  returns  in  the entry  
    <tt>
        <b>s(i,j)</b>
      </tt> the value <tt>
        <b>(x(i,j)-xbarh(i))/sigmah(i)</b>
      </tt> with
    <tt>
        <b>xbarh(i)</b>
      </tt> the mean of the  values of the <tt>
        <b>i</b>
      </tt> row
    and <tt>
        <b>sigmah(i)</b>
      </tt> the  standard deviation of the <tt>
        <b>i</b>
      </tt>
    row of <tt>
        <b>x</b>
      </tt>.</p>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>

x=[0.2113249 0.0002211 0.6653811;
   0.7560439 0.3303271 0.6283918]
s=wcenter(x)
s=wcenter(x,'r')
s=wcenter(x,'c')
 
  </pre>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="center.htm">
        <tt>
          <b>center</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
    <h3>
      <font color="blue">Author</font>
    </h3>
    <p> Carlos Klimann</p>
  </body>
</html>
